<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Box2D: b2Sweep Struct Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="icon.gif"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Box2D
   &#160;<span id="projectnumber">2.2.1</span>
   </div>
   <div id="projectbrief">A 2D Physics Engine for Games</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">b2Sweep Struct Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="b2Sweep" -->
<p><code>#include &lt;<a class="el" href="b2_math_8h_source.html">b2Math.h</a>&gt;</code></p>

<p><a href="structb2_sweep-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_sweep.html#a81947646092468290d15005928e12fcd">GetTransform</a> (<a class="el" href="structb2_transform.html">b2Transform</a> *xfb, float32 beta) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_sweep.html#a35eb9b976ca87c9b8d758bec070c6c06">Advance</a> (float32 alpha)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_sweep.html#ad66a3086bc7656df9cf7454013a2f61b">Normalize</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Normalize the angles.  <a href="#ad66a3086bc7656df9cf7454013a2f61b"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bcc302cf78771896d6256fc53f2f8be"></a><!-- doxytag: member="b2Sweep::localCenter" ref="a4bcc302cf78771896d6256fc53f2f8be" args="" -->
<a class="el" href="structb2_vec2.html">b2Vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_sweep.html#a4bcc302cf78771896d6256fc53f2f8be">localCenter</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">local center of mass position <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16dacd7188f3c7b2adef3242012587d8"></a><!-- doxytag: member="b2Sweep::c0" ref="a16dacd7188f3c7b2adef3242012587d8" args="" -->
<a class="el" href="structb2_vec2.html">b2Vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><b>c0</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1b5402e01b92cc82473389fc6f0375c3"></a><!-- doxytag: member="b2Sweep::c" ref="a1b5402e01b92cc82473389fc6f0375c3" args="" -->
<a class="el" href="structb2_vec2.html">b2Vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_sweep.html#a1b5402e01b92cc82473389fc6f0375c3">c</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">center world positions <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acf89c7d1223f8ab27501ff033aeac92b"></a><!-- doxytag: member="b2Sweep::a0" ref="acf89c7d1223f8ab27501ff033aeac92b" args="" -->
float32&#160;</td><td class="memItemRight" valign="bottom"><b>a0</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afa96bacc91dd3c92ae716a45512332d6"></a><!-- doxytag: member="b2Sweep::a" ref="afa96bacc91dd3c92ae716a45512332d6" args="" -->
float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_sweep.html#afa96bacc91dd3c92ae716a45512332d6">a</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">world angles <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_sweep.html#aa5f8ab90178b58bc0777096cbc6b91cf">alpha0</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin, which may no coincide with the center of mass. However, to support dynamics we must interpolate the center of mass position. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a35eb9b976ca87c9b8d758bec070c6c06"></a><!-- doxytag: member="b2Sweep::Advance" ref="a35eb9b976ca87c9b8d758bec070c6c06" args="(float32 alpha)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b2Sweep::Advance </td>
          <td>(</td>
          <td class="paramtype">float32&#160;</td>
          <td class="paramname"><em>alpha</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Advance the sweep forward, yielding a new initial state. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">alpha</td><td>the new initial time. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a81947646092468290d15005928e12fcd"></a><!-- doxytag: member="b2Sweep::GetTransform" ref="a81947646092468290d15005928e12fcd" args="(b2Transform *xfb, float32 beta) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b2Sweep::GetTransform </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structb2_transform.html">b2Transform</a> *&#160;</td>
          <td class="paramname"><em>xfb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float32&#160;</td>
          <td class="paramname"><em>beta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the interpolated transform at a specific time. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">beta</td><td>is a factor in [0,1], where 0 indicates alpha0. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad66a3086bc7656df9cf7454013a2f61b"></a><!-- doxytag: member="b2Sweep::Normalize" ref="ad66a3086bc7656df9cf7454013a2f61b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b2Sweep::Normalize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Normalize the angles. </p>
<p>Normalize an angle in radians to be between -pi and pi. </p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="aa5f8ab90178b58bc0777096cbc6b91cf"></a><!-- doxytag: member="b2Sweep::alpha0" ref="aa5f8ab90178b58bc0777096cbc6b91cf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float32 <a class="el" href="structb2_sweep.html#aa5f8ab90178b58bc0777096cbc6b91cf">b2Sweep::alpha0</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fraction of the current time step in the range [0,1] c0 and a0 are the positions at alpha0. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="b2_math_8h_source.html">b2Math.h</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sat Sep 17 2011 17:35:56 for Box2D by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
